package com.cy.pj.yy.dao;

import com.cy.pj.yy.pojo.DoSickRoom;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface DoSickRoomDao {
    List<DoSickRoom> findByTraid(Integer Traid);
    @Select("select * from sys_room where number<fullnumber")
   List<DoSickRoom> findObjects();
  /*  @Insert(" insert into sys_patient (Traid,patientname,Roomid,Department,number,fullnumber) values (#{Traid}，#{patientname}，#{Roomid}，#{Department}，#{number}，#{fullnumber})")
    int addAll
    (Integer Traid,String patientname,Integer Roomid,String Department,Integer number,Integer fullnumber);*/

    @Insert(" insert into sys_patient (Traid,patientname,Roomid,Department,number,fullnumber) " +
            "values (#{Traid},#{patientname},#{Roomid},#{Department},#{number},#{fullnumber})")
    int addAll(DoSickRoom d);
}
